package com.hxx.mapper;

import com.hxx.domain.Employee;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface EmployeeMapper {
    Map<String,Object> selectEmpNameAndMaxSalary();

    int countEmployee();
    int updateEmployeeByMap(Map<String, Object> paramMap);
    List<Employee> selectEmployeeByMap1(@Param("currentRow") int currentRow,@Param("sizeRows") int sizeRows);

    List<Employee> selectEmployeeByMap(Map<String, Object> paramMap);
    /**
     * 根据员工id查询员工数据方法
     * @param empId  员工id
     * @return 员工实体对象
     */
    Employee selectEmployee(Integer empId);

    @Select("select * from t_emp where ${column} = #{value}")
    Employee findByColumn(@Param("column") String column,
                          @Param("value") String value);

    int insertEmployee(Employee employee);

    int updateEmployee(@Param("empId") Integer empId,@Param("empSalary") Double empSalary);

}